package com.cskt.petproject178.mapper;

import com.cskt.petproject178.pojo.entity.Order;
import com.cskt.petproject178.pojo.vo.OrderDetailVO;
import com.cskt.petproject178.pojo.vo.OrderVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Long id);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Order record);

    OrderDetailVO selectOrderDetailVOByOrderNo(String orderNo);
    Order selectOrderByOrderNo(String orderNo);

    List<OrderVO> selectOrderVOByOrderNo(String orderNo);

    int updateOrderStatus(@Param(value = "orderNo") String orderNo,@Param(value = "orderStatus") Integer orderStatus);

    //根据用户id查询订单
    List<Order> selectOrderParam(@Param(value = "userId") Long userId,@Param(value="orderNo") String orderNo,@Param(value = "payStatus") Integer payStatus, @Param(value = "startingNo") Integer startingNo,@Param(value = "pageSize") Integer pageSize);

    Integer selectOrderCount(@Param(value = "userId") Long userId,@Param(value="orderNo") String orderNo,@Param(value = "payStatus") Integer payStatus, @Param(value = "startingNo") Integer startingNo,@Param(value = "pageSize") Integer pageSize);

}